<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main"/>
    <g:set var="entityName" value="${message(code: 'note.label', default: 'Note')}"/>
    <title><g:message code="default.list.label" args="[entityName]"/></title>
</head>

<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li>Next CRM</li>
                    <li class="active">
                        <span>note列表</span>
                    </li>
                </ol>
            </div>

            <h2 class="font-light m-b-xs">
                note
            </h2>
        </div>
    </div>
</div>

<div class="content animate-panel">

    <div class="row">
        <div class="hpanel hgreen">
            <div class="panel-heading">
                <div class="panel-tools">
                    <!-- <g:link action="create" class="btn btn-info btn-xs"><i class="fa fa-plus"></i>新增</g:link> -->
                </div>
                所有笔记
            </div>

            <div class="panel-body">
                <div class="table-responsive">
                    <table class="table table-striped table-hover">
                        <thead>
                        <tr>
                            <g:sortableColumn property="subject" title="标题"/>
                            <g:sortableColumn property="user" title="用户"/>
                            <g:sortableColumn property="createBy" title="创建人"/>
                            <g:sortableColumn property="modifyBy" title="修改人"/>
                            <g:sortableColumn property="createdDate" title="创建时间"/>
                            <g:sortableColumn property="modifiedDate" title="修改时间"/>
                        </tr>
                        </thead>
                        <tbody>
                        <g:each in="${noteList}">
                            <tr>
                                <td>
                                    <g:link controller="note" action="show" id="${it?.id}"
                                            class="firstTd">${it?.subject}</g:link>
                                </td>

                                <td>${it?.user}</td>
                                <td>${it?.createBy?.fullName}</td>
                                <td>${it?.modifyBy?.fullName}</td>
                                <td><g:formatDate date="${it?.createdDate}"
                                                  format="yyyy-MM-dd HH:mm:ss"></g:formatDate></td>
                                <td><g:formatDate date="${it?.modifiedDate}"
                                                  format="yyyy-MM-dd HH:mm:ss"></g:formatDate></td>
                            </tr>
                        </g:each>
                        </tbody>
                    </table>
                </div>
            </div>

            <div class="panel-footer">
                <div class="pagination">
                    <g:paginate total="${noteCount ?: 0}"/>
                </div>
            </div>
        </div>
    </div>
</div>

</html>
